﻿using Newtonsoft.Json;
using System.Collections.Generic;

namespace AutomationCommand
{
    public class wb_data_read_new : BasiCommand
    {
        [JsonProperty("type")]
        public string Type { get; set; }

        [JsonProperty("tablename")]
        public string TableName { get; set; }

        [JsonProperty("api")]
        public string Api { get; set; }

        [JsonProperty("condition")]
        public List<Condition> Condition { get; set; }

        [JsonProperty("limit_0")]
        public string Limit0 { get; set; }

        [JsonProperty("limit_n")]
        public string LimitN { get; set; }

        public wb_data_read_new()
        {
            FunctionType = "wb_data_read_new";
            OtherName = "读取数据库";
            Type = "rnd";
            TableName = "";
            Api = "";
            Condition = new List<Condition>();
            Limit0 = "";
            LimitN = "";
            SuccessJump = -1;
            FailureJump = -1;
        }

        public bool Execute()
        {
            // 在这里编写执行命令的逻辑
            // 返回执行结果
            return true; // 假设此处始终成功
        }
    }
}
